public class Car {
    /**
     * (1)私有成员变量包括汽车品牌brand，排气量emission和价格price；
     * (2)定义一个构造方法初始化所有成员变量；
     * (3)定义getBrand()方法返回品牌信息;
     * (4)功能方法包括：starting()方法启动发动机。
     * */
    private  String brand;
    private double emission;
    private double price;
    Car(){
        this.brand="BMW";
         this.emission=2.0;
         this.price=100000;
    }
    Car(String brand,double emission,double price){
        this.brand=brand;
         this.emission=emission;
         this.price=price;
    }
    public String getBrand(){
        return brand;
    }
    public void starting(){
        System.out.println("发动机启动");
        //Car信息
        System.out.println("品牌："+brand+" 排气量："+emission+" 价格："+price);
    }
}
